home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c,comp.std.c
- Path: bln.sel.alcatel.de!slsv6bt!slsv6bt!kanze
- From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
- Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
- In-Reply-To: ENGR@GSSI.MV.COM's message of Fri, 2 Feb 1996 18:16:31 GMT
- Message-ID: <KANZE.96Feb5133404@slsvewt.lts.sel.alcatel.de>
- Sender: news@lts.sel.alcatel.de
- Organization: SEL
- References: <30C40F77.53B5@swsbbs.com> <SPENCER.96Jan22113215@zorgon.ERA.COM>
- <KANZE.96Feb2133347@slsvewt.lts.sel.alcatel.de> <DM5urJ.Aq5@mv.mv.com>
- Date: 05 Feb 1996 12:34:04 GMT
-
- In article <DM5urJ.Aq5@mv.mv.com> ENGR@GSSI.MV.COM (Michael Furman)
- writes:
-
- |> In article <KANZE.96Feb2133347@slsvewt.lts.sel.alcatel.de>,
- |> kanze@lts.sel.alcatel.de says...
- |> > ..................................
- |> >Note that implementations *are* allowed to offer extensions, and
- |> >define undefined behavior in an implementation specific manner. An
- |> >implementation which defines, for example, that writing to the address
- |> >0 clears the screen, is perfectly legal. If you write code uniquely
- |> >for that implementation, and you have to clear the screen, you will
- |> >dereference a null pointer. If this is the only way of clearing the
- |> >screen on said implementation, and your application requires clearing
- |> >the screen, you will write code dereferencing a null pointer.
- |> >
- |> >That doesn't make such code any less undefined with regards to the
- |> >standard.
-
- |> I can not say that I agree ... Of cause some implementation may define
- |> any "undefined" behavior. But I still see two very different cases -
- |> a) when construction assumed as incorrect, like dereferinsing wrong
- |> pointer and when it has clear purpose, but exect meaning can not be
- |> defined portable (like "asm").
-
- |> What do you think about code with "asm" statements. Is it "less undefined"
- |> and if not - what is the sense and reason of including
- |> "asm" keyword in the standard?
-
- There is no `asm' keyword in the C standard.
-
- I do see a difference in using an `asm' extension (with the meaning as
- in classical C) and dereferencing a null pointer, in that the first is
- not undefined behavior; it requires a diagnostic, so presumably,
- anyone porting my code will stumble across it, and realize that they
- have a portability problem.
-
- But this only works because `asm' is *not* undefined behavior.
- --
- James Kanze Tel.: (+33) 88 14 49 00 email: kanze@gabi-soft.fr
- GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
- Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
- -- A la recherche d'une activitΘ dans une region francophone
-
-